From: Jonas Ã…dahl Date: Thu, 2 Feb 2023 14:54:05 +0000 (+0100) Subject: overviewControls: Don't hide destroyed child widget on unmap X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~73 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=73e0f02b1d0b157c07700a7905044217fb7101ab;p=gnome-shell.git overviewControls: Don't hide destroyed child widget on unmap When we unmap, the child widgets have already been destroyed, so we shouldn't try to. To detect this, delete the references we keep to them on destroy, and null-check the hide call. Part-of: --- diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 66f291b10..3528a73b1 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -506,6 +506,8 @@ class ControlsManager extends St.Widget { () => this._shiftState(Meta.MotionDirection.DOWN)); this._update(); + + this.connect('destroy', this._onDestroy.bind(this)); } _getFitModeForState(state) { @@ -715,7 +717,16 @@ class ControlsManager extends St.Widget { vfunc_unmap() { super.vfunc_unmap(); - this._workspacesDisplay.hide(); + this._workspacesDisplay?.hide(); + } + + _onDestroy() { + delete this._searchEntryBin; + delete this._appDisplay; + delete this.dash; + delete this._searchController; + delete this._thumbnailsBox; + delete this._workspacesDisplay; } prepareToEnterOverview() {